export RUSTC := rustc
else
export RUSTC := $(CURDIR)/rustc/bin/rustc
+export LD_LIBRARY_PATH := $(CURDIR)/rustc/lib:$(LD_LIBRARY_PATH)
+export DYLD_LIBRARY_PATH := $(CURDIR)/rustc/lib:$(DYLD_LIBRARY_PATH)
endif
-export PATH := $(PATH):$(CURDIR)/rustc/bin
+export PATH := $(CURDIR)/rustc/bin:$(PATH)
# Link flags to pull in dependencies
BINS = cargo \
--out-dir {dir}{sep}target{sep}release \
-L {dir}{sep}target{sep}release \
-L {dir}{sep}target{sep}release{sep}deps \
- --extern foo={dir}/target/release/deps/libfoo{hash1}.rlib`
+ --extern foo={dir}{sep}target{sep}release{sep}deps/libfoo{hash1}.rlib`
{compiling} foo v0.0.0 (file:{dir})
{compiling} test v0.0.0 (file:{dir})\n",
running = RUNNING,
+use std::str;
+
use support::{project, execs, basic_bin_manifest, COMPILING, cargo_dir};
+use support::{ResultTest};
use hamcrest::{assert_that, existing_file};
use cargo::util::process;
fn bin_test() {}
");
- assert_that(p.cargo_process("cargo-test"),
- execs().with_status(0)
- .with_stdout(format!("\
-{compiling} foo v0.0.1 (file:{dir})
+ let output = p.cargo_process("cargo-test")
+ .exec_with_output().assert();
+ let out = str::from_utf8(output.output.as_slice()).assert();
+ let bin = "\
running 1 test
test bin_test ... ok
-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
-
-
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured";
+ let lib = "\
running 1 test
test lib_test ... ok
-test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
+test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured";
+
+ let head = format!("{compiling} foo v0.0.1 (file:{dir})",
+ compiling = COMPILING, dir = p.root().display());
-", compiling = COMPILING, dir = p.root().display()).as_slice()));
+ assert!(out == format!("{}\n\n{}\n\n\n{}\n\n", head, bin, lib).as_slice() ||
+ out == format!("{}\n\n{}\n\n\n{}\n\n", head, lib, bin).as_slice());
})
test!(test_with_deep_lib_dep {